<?php
session_start();
require '../nette/Nette/loader.php';
require '../db.php';
require '../localization/lang.php';
require '../core/core.sanitizer.php';
require '../core/core.security.php';
require '../core/core.dfs.php';
require '../visual/visual.dfs.php';
require '../core/core.time.php';
require '../core/core.usermanagement.php';

$login=new core_security;
if ($login->checklogin()=="OK" AND $_SESSION['role']<=2) {


if ($_SESSION['role'] < 1 ) {

$user = new core_user;
$user->setid($_POST['id']);
if ($_POST['action'] == "disable" ) {
	$user->disabled=1;
	}
if ($_POST['action'] == "enable" ) {
	$user->disabled="0";
	}
echo $user->edituser_validate();
$user->edituser();

echo $_POST['value'];


}
}
